#include "stdafx.h"
#include "StringUtility.h"

namespace ST_Utility
{
	void StringUtility::StringReplace(string& strText, string strOld, string strNew)
	{
		string::size_type pos = 0;  
		string::size_type srcLen = strOld.size();  
		string::size_type desLen = strNew.size();  
		pos=strText.find(strOld, pos);   
		while ((pos != string::npos))  
		{  
			strText.replace(pos, srcLen, strNew);  
			pos=strText.find(strOld, (pos+desLen));  
		}  
	}
}
